<template>
  <div class="box footer-banner">
    <van-swipe class="my-swipe" :autoplay="5000" indicator-color="white">
      <van-swipe-item v-for="(item, index) in list" :key="index">
        <img :src="getImgUrl(item.posterUrl)" alt="" />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import { Banner } from "@/api/index";
export default {
  props: {
    id: {
      type: [String, Number],
      default: "",
    },
  },
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    Banner({
      posterIdentifying: "12",
    }).then((res) => {
      if (res.data.code == 200) {
        this.list = res.data.data;
      }
    });
  },
  methods: {
    getImgUrl(img) {
      return this.montageImgUrl(img);
    },
  },
};
</script>

<style scoped>
.box {
  width: 100%;
  height: .8rem;
  margin-top: .1rem;
}
.banner {
  margin-top: 0.1rem;
}
.van-swipe {
  width: 100%;
  height: .8rem;
}

img {
  width: 100%;
  height: .8rem;
}
</style>